How to install Short{Paste} on EndeavourOS Latest

Short{Paste} is an open-source URL shortener that lets you create shortened URLs for your long and complex links. In this tutorial, we will show you how to install Short{Paste} on EndeavourOS Latest.

Prerequisites

Before you begin with the installation process, make sure your system meets the following prerequisites:

Install Required Packages

The first step is to ensure that all the required packages and dependencies are installed on your system. Open the terminal and run the following command:

sudo pacman -Syu git nginx php php-fpm composer

These commands will update your system, allow you to install packages using pacman, and install Git, Nginx, PHP, PHP-FPM, and Composer.

Clone the Short{Paste} repository

Now, clone the Short{Paste} repository using the following command:

sudo git clone https://github.com/adyanth/shortpaste.git /var/www/shortpaste

This command will clone the repository into the "/var/www/shortpaste" directory.

Install Composer Dependencies

Enter the cloned directory and install the dependencies using Composer:

cd /var/www/shortpaste
sudo composer install

Configure Nginx Server Blocks

Now, create an Nginx server block for Short{Paste} using the following command:

sudo nano /etc/nginx/sites-available/shortpaste.conf

Then, copy and paste the following configuration:

server {
    listen 80;

    server_name ShortPaste;

    root /var/www/shortpaste/public;

    index index.php;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
        expires 1y;
        add_header Cache-Control "public";
    }

    location ~ \.php$ {
        fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param APP_ENV production;
        fastcgi_param APP_DEBUG 0;
        fastcgi_param APP_KEY "key_here";
        fastcgi_keep_conn on;
    }
}

Change the "APP_KEY" value with a unique key.

Save and close the file by pressing CTRL+X, then y and ENTER.

Create a symbolic link to enable the server block:

sudo ln -s /etc/nginx/sites-available/shortpaste.conf /etc/nginx/sites-enabled/

Finally, restart Nginx to apply the changes:

sudo systemctl restart nginx

Configuration of the Application

Copy and rename the ".env.example" file to ".env":

cp .env.example .env

Edit the ".env" file and configure the database:

nano .env

Run Database Migrations

Now, run the database migrations using the following command:

php artisan migrate

Create an Admin User

Create an admin user using the following command:

php artisan user:create

Follow the instructions and provide the required information.

Conclusion

That's it! You have successfully installed Short{Paste} on your EndeavourOS Latest system. You can now start creating shortened URLs for your long and complex links.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!